home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / openssh-client.postrm < prev    next >
Text File  |  2008-10-13  |  997b  |  39 lines

  1. #!/bin/sh -e
  2.  
  3. # Automatically added by dh_installdebconf
  4. if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then
  5.     . /usr/share/debconf/confmodule
  6.     db_purge
  7. fi
  8. # End automatically added section
  9.  
  10.  
  11. abort_transfer_conffile () {
  12.     CONFFILE="$1"
  13.     if [ -e "$CONFFILE.moved-by-preinst" ]; then
  14.         echo >&2 "Aborting ownership transfer of conffile $CONFFILE ..."
  15.         mv -f "$CONFFILE.moved-by-preinst" "$CONFFILE"
  16.         return 0
  17.     fi
  18. }
  19.  
  20. case $1 in
  21.     abort-install|abort-upgrade)
  22.         abort_transfer_conffile /etc/ssh/moduli
  23.         abort_transfer_conffile /etc/ssh/ssh_config
  24.         ;;
  25.     purge)
  26.         # Remove all non-conffiles that ssh might create, so that we
  27.         # can smoothly remove /etc/ssh if and only if the user
  28.         # hasn't dropped some other files in there. Conffiles have
  29.         # already been removed at this point.
  30.         rm -f /etc/ssh/moduli /etc/ssh/primes
  31.         rm -f /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2
  32.         rmdir --ignore-fail-on-non-empty /etc/ssh
  33.  
  34.         delgroup --quiet ssh > /dev/null || true
  35.         ;;
  36. esac
  37.  
  38. exit 0
  39.